package com.itlong.cloud.equip.property;

import com.itlong.cloud.POJO.DTO.property.DeviceMediaGateBindAddressGetPageDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaGateSaveDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaGateUpdateDTO;
import com.itlong.cloud.POJO.DTO.property.DeviceMediaRemoveGateBindAddressDTO;
import com.itlong.cloud.POJO.VO.property.DeviceMediaBindAddressVO;
import com.itlong.cloud.POJO.VO.property.DeviceMediaGateInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *   门口机设备多媒体信息服务接口协议提供对象.
 * </desc>
 *
 * @createDate 2017-10-23
 */
@FeignClient(name = "equip-service")
public interface IDeviceMediaGateServiceClient {
    /**
     * <desc>
     *      保存单个门口机设备多媒体信息
     * </desc>
     *
     * @param deviceMediaGateSaveDTO  保存门口机设备多媒体信息数据传输对象
     * @return 受影响的行数
     * @author Lix
     * @createDate 2017-10-23
     */
    @RequestMapping(path = "property/deviceMediaRelation/save",method = {RequestMethod.POST})
    Integer saveDeviceMediaGateInfo(@RequestBody DeviceMediaGateSaveDTO deviceMediaGateSaveDTO) throws Exception;

    /**
     * <desc>
     *     修改单个门口机设备多媒体信息【根据多媒体Id（mediaId）】
     * </desc>
     *
     * @param deviceMediaGateUpdateDTO 修改门口机设备多媒体信息数据传输对象
     * @return 受影响的行数
     * @author Lix
     * @createDate 2017-10-23
     */
    @RequestMapping(path = "property/deviceMediaRelation/updateDeviceMediaGateInfo",method = {RequestMethod.POST})
    Integer updateDeviceMediaGateInfo(@RequestBody DeviceMediaGateUpdateDTO deviceMediaGateUpdateDTO) throws Exception;


    /**
     * <desc>
     *    根据多媒体资源Id获取门口机多媒体资源及其对应的地址列表.
     * </desc>
     *
     * @param mediaId 多媒体资源ID
     * @return 门口机多媒体资源及其对应的地址列表
     * @author LewisLouis
     * @createDate 2017-11-21
     */
    @RequestMapping(path = "property/deviceMediaRelation/getOneMediaGateInfo",method = {RequestMethod.POST})
    DeviceMediaGateInfoVO getOneMediaGateInfo(@RequestParam("mediaId")String mediaId);



    /**
     * <desc>
     *      分页查询指定的门口机多媒体资源绑定的地址列表
     * </desc>
     *
     * @param deviceMediaGateBindAddressGetPageDTO  分页查询门口机多媒体资源绑定的住址列表参数
     * @return  绑定的地址列表
     * @author LouisLewis
     * @createDate 2017-11-23
     */
    @RequestMapping(path = "property/deviceMediaRelation/getPageOneMediaGateBindAddressInfos",method = {RequestMethod.POST})
    Page<DeviceMediaBindAddressVO> getPageOneMediaGateBindAddressInfos(
            @RequestBody DeviceMediaGateBindAddressGetPageDTO deviceMediaGateBindAddressGetPageDTO) throws Exception;

    /**
     * <desc>
     *    删除门口机多媒体资源-与指定地址的关系.
     * </desc>
     *
     * @param deviceMediaRemoveGateBindAddressDTO   需要删除的门口机多媒体资源关联的部分地址关系.
     * @return 受影响的行数
     * @author LewisLouis
     * @createDate 2017-11-23
     */
    @RequestMapping(path = "property/deviceMediaRelation/removeMediaGateRelation",method = {RequestMethod.POST})
    Integer removeMediaGateRelation(@RequestBody DeviceMediaRemoveGateBindAddressDTO deviceMediaRemoveGateBindAddressDTO);
}
